home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 June / EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso / earcd / amos / amsls496.lzh / AMOSLIST / 000076_amos-request@svcs1.digex.net_Wed Apr 24 20:25:59 1996.msg < prev    next >
Internet Message Format  |  1996-05-01  |  4KB

  1. Received: from svcs1.digex.net (svcs1.digex.net [204.91.197.224]) by mail1.access.digex.net (8.6.12/8.6.12) with ESMTP id UAA05333;  for <mcox@access.digex.net> ; Wed, 24 Apr 1996 20:25:54 -0400
  2. Received: (from daemon@localhost) by svcs1.digex.net (8.6.12/8.6.12) id QAA11459 for amos-out; Wed, 24 Apr 1996 16:55:35 -0400
  3. Received: from mail1.access.digex.net (mail1-2.access.digex.net [204.91.197.3]) by svcs1.digex.net (8.6.12/8.6.12) with ESMTP id QAA11456 for <amos-list@svcs1.digex.net>; Wed, 24 Apr 1996 16:55:35 -0400
  4. Received: from conan.eds-ms.com (conan.eds-ms.com [204.240.136.11]) by mail1.access.digex.net (8.6.12/8.6.12) with SMTP id QAA03257;  for <amos-list@access.digex.net> ; Wed, 24 Apr 1996 16:55:34 -0400
  5. Received: from relay-1.mail.demon.net by conan.eds-ms.com (5.x/SMI-SVR4)
  6.     id AA05011; Wed, 24 Apr 1996 16:55:35 -0400
  7. Received: from gate.demon.co.uk ([158.152.1.65]) by relay-1.mail.demon.net
  8.           id aa01652; 24 Apr 96 21:54 +0100
  9. Received: by cybent.demon.co.uk (V1.16/Amiga)
  10.     id AA000hf; Tue, 23 Apr 96 23:37:07 GMT
  11. Date: Tue, 23 Apr 96 23:37:07 GMT
  12. Message-Id: <9604232337.AA000he@cybent.demon.co.uk>
  13. Lines: 78
  14. X-Mailer: ADMail 1.7 Copyright 1995 S.T.Brown
  15. From: Tom Davies <tommy@cybent.demon.co.uk>
  16. To: amos-list@conan.eds-ms.com
  17. Subject: Bobs on scrolling maps
  18. Status: RO
  19. X-Status: 
  20.  
  21. Hi dudez
  22.  
  23. Im am very surprised to read all this absolute junk everyone is spouting
  24. regarding bobs and scrolling maps !!! What planet are you guys living on
  25. !!!
  26.  
  27. "There is no easy way to do it without AMAL"
  28.  
  29. Excuse me !!!
  30.  
  31. "When I move one bob all the others update this is slow"
  32.  
  33. Right... let's take things nice and slowwwwwwwly
  34.  
  35. Setting up a tile based system to scroll with aint easy but I saw a routine
  36. in CU Amiga a few years back that was absolutly superb and does it really
  37. well. Decide on the size of blocks... I went for 32*50 on a 200 lines
  38. screen. Decide how long the level will be (every 10 bloks equates to 1
  39. screen). Write a data routine that goes through the level with image
  40. numbers at all the various points, and read this into a well thought out
  41. array.
  42.  
  43. Open a screen about 750 by 200 .Offset it 32 pixels and paste down all the
  44. icons on the screen. Then write a scroll routine that dies this :-
  45.  
  46. 1. Offsets the screen. 
  47. 2. Every 32 pixels draws 1 block to the LEFT of the viewport.
  48. 3. At the end of the scrreen, Whip it back the the start where it will be
  49. waiting nice and neat as youve drawn the icons previously with paste icon.
  50.  
  51. Use a parameter to control the offset each time and then the scroller can
  52. be called in a main loop nice and easy.
  53.  
  54. Bobs. Right. Hardware scrolling as I just described simply shifts the part
  55. of the screen you can see on the TV. Imagine behind the TV is a huge
  56. poster. It moves the TV screen around the poster, revealing new bits
  57. underneath. As any bobs drawn are part of the bitmap, off course they will
  58. move with the screen too !!!
  59.  
  60. To deal with this i do this. Whenever the bob needs to move, move him by x
  61. pixels. Call the scroll routine with x as the parameter and all is well !!!
  62. He stays still on the map !
  63.  
  64. However I suggest using the blitter more wisely. Turn off Update-
  65.  
  66. Update off
  67.  
  68. Put us into manual mode-
  69.  
  70. double buffer
  71. Autoback 0
  72. At the start of the loop, add a bob clear. Move your bobs around as you
  73. please. If you are gonna paste icons here as well, you need to do so twice,
  74. adding a screen swap after each redraw :-
  75.  
  76. for p=1 to2
  77. Draw icons
  78. screen swap
  79. next
  80.  
  81. this ensures both screens "get it". After, at the end of the loop, Update
  82. bobs, swap screen and wait Vbl... or maybe in another order.
  83.  
  84.  
  85. This is the way to do it, as my game DARKNESS shows. Its nearing completion
  86. and i think it REALLY pushes AMOS to the limits - you'll be able to see it
  87. soon when I realease the beta test version for you lot to play with.
  88.  
  89.  
  90.  
  91. Tom Davies
  92. aka CyberMan
  93.   
  94.  
  95. -- 
  96. -Tom Davies - tommy@cybent.demon.co.uk 
  97.  
  98. -Call my BBS in th UK on 0144-322-6418 10pm-7am GM